export default {
    state:{
        num:20
    },
    actions:{
        add(state:{num:number}){
            state.num++
        },
        addval(state:{num:number},action:{value:number}){
            state.num+=action.value
        }
    },
    asyncActions:{
        // eslint-disable-next-line @typescript-eslint/ban-types
        asyncAdd(dispatch:Function){
            setTimeout(()=>{
                dispatch({type:'add'})
            },1000)
        }
    }
}